﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Threading;

namespace Hugo
{
    class MouseCursorController
    {

        private DispatcherTimer handTimer;
        private HandCursor Cursor;

        public MouseCursorController(HandCursor cursor)
        {
            this.Cursor = cursor;

            handTimer = new DispatcherTimer();
            handTimer.Tick += new EventHandler(syncHandToCursor);
            handTimer.Interval = TimeSpan.FromMilliseconds(10);
            handTimer.Start();
        }

        public void syncHandToCursor(Object sender, EventArgs e)
        {
            Cursor.setCursorPosition(System.Windows.Forms.Cursor.Position.X, System.Windows.Forms.Cursor.Position.Y);
        }
    }
}
